// mallPages/index/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    // swiper相关 start
    indicatorDots: false,
    autoplay: true,
    interval: 3000,
    duration: 500,
    swiperList: [{
      id: 0,
      img: "../../images/mall_banner.png"
    },{
      id: 1,
      img: "../../images/mall_banner.png"
    },{
      id: 2,
      img: "../../images/mall_banner.png"
    }],
    currentIndex: 0,
    // swiper相关 end

    // 新年福利列表
    newYearProList: [],
    // 新春福利列表
    springProList: [],
    // newYearProList: [{
    //   id: 0,
    //   img: "../../images/index_product_demo.png",
    //   name: "坚果礼盒坚果礼盒坚果礼盒坚果礼盒"
    // },{
    //   id: 1,
    //   img: "../../images/index_product_demo.png",
    //   name: "可爱儿童杯"
    // },{
    //   id: 2,
    //   img: "../../images/index_product_demo.png",
    //   name: "NARS散粉"
    // },{
    //   id: 3,
    //   img: "../../images/index_product_demo.png",
    //   name: "honey蜂蜜"
    // }],
    // springProList: [{
    //   id: 0,
    //   img: "../../images/index_product_demo.png",
    //   name: "坚果礼盒坚果礼盒坚果礼盒"
    // },{
    //   id: 1,
    //   img: "../../images/index_product_demo.png",
    //   name: "可爱儿童杯可爱儿童杯"
    // },{
    //   id: 2,
    //   img: "../../images/index_product_demo.png",
    //   name: "NARS散粉NARS散粉"
    // },{
    //   id: 3,
    //   img: "../../images/index_product_demo.png",
    //   name: "honey蜂蜜honey蜂蜜"
    // }],
    // 精选好物列表
    recommeProList:  [{
      id: 0,
      img: "../../images/index_product_demo.png",
      name: "坚果礼盒坚果礼盒坚果礼盒"
    },{
      id: 1,
      img: "../../images/index_product_demo.png",
      name: "可爱儿童杯可爱儿童杯"
    }],
    // 新年福利是否已兑换
    newyearExchanged: false,
    // 新春福利是否已兑换
    springExchanged: false,
    // 弹层显示判断
    popShow: false
  },

  // 关闭弹层事件
  closePop: function (e) {
    this.setData({
      popShow: false
    })
  },

  // 开启弹层事件
  eventPopShow: function (e) {
    this.setData({
      popShow: true
    })
  },

  // swiper 导航按钮事件
  bannerChange: function (e) {
    let index = e.detail.current;
    this.setData({
      currentIndex:index
    })
  },

  onLoad: function (options) {

  },
})